#用于跟踪游戏统计信息的新类——GameStats
class GameStats():
    op = 0
    sp = 1
    #跟踪游戏统计信息
    def __init__(self,ai_settings):
        self.op = ai_settings.op + 1
        #初始化统计信息
        self.ai_settings = ai_settings
        self.reset_stats()
        #在任何情况下都不应重置最高得分
        self.high_score = 0
        #游戏一开始处于非活跃状态
        self.game_active = False
 
    def reset_stats(self):
        #初始化在游戏运行期间可能变化的统计信息
        self.ships_left = self.ai_settings.ship_limit
 
        self.score = 0
        #游戏等级
        self.level = 1
    def increase(self):
        # 下面这个是增加子弹的范围的 便于后期的碰撞的检测的
        self.ai_settings.bullet_width += 100
        self.ai_settings.bullet_height += 100
        self.ai_settings.op += 1
        print(self.ai_settings.op)
        self.ai_settings.money()
        if self.ai_settings.op == 2  :
            self.ai_settings.bullet_width -= 100
            self.ai_settings.bullet_height -= 100
        if self.ai_settings.op == 3:
            self.ai_settings.bullet_width += 100
            self.ai_settings.bullet_height += 100
        elif self.ai_settings.op > 3:
            self.ai_settings.bullet_width -= 100
            self.ai_settings.bullet_height -= 100

